.TH "Zebulon::MCU::MessageFactory" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Zebulon::MCU::MessageFactory \- 
.PP
\fBInterface\fP for dynamic creation of messages. This interface is used by the \fBInterface\fP class when receiving new messages to de-serialize. Use this interface to add Custom MCU type messages for reading by the generic MCU \fBInterface\fP class.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <messagefactory.h>\fP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBInitialize\fP ()"
.br
.RI "\fIAdds the default messages (\fBPing\fP, \fBPong\fP, and \fBQueryReport\fP) to the factory. \fP"
.ti -1c
.RI "static \fBMessage\fP * \fBCreateMessage\fP (const \fBMessage::Code\fP code)"
.br
.RI "\fICreates a message based on the code passed. \fP"
.ti -1c
.RI "static int \fBAddToFactory\fP (\fBMessage\fP *message)"
.br
.RI "\fIAdds a message to the Factory so new ones can be created. \fP"
.ti -1c
.RI "static void \fBClear\fP ()"
.br
.RI "\fIDeletes all messages in the factory. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\fBInterface\fP for dynamic creation of messages. This interface is used by the \fBInterface\fP class when receiving new messages to de-serialize. Use this interface to add Custom MCU type messages for reading by the generic MCU \fBInterface\fP class. 
.SH "Member Function Documentation"
.PP 
.SS "int MessageFactory::AddToFactory (\fBMessage\fP * message)\fC [static]\fP"
.PP
Adds a message to the Factory so new ones can be created. \fBParameters:\fP
.RS 4
\fImessage\fP \fBMessage\fP to add to factory (takes ownership of pointer).
.RE
.PP
\fBReturns:\fP
.RS 4
1 on success, 0 if a message with the same code already is added. 
.RE
.PP

.SS "\fBMessage\fP * MessageFactory::CreateMessage (const \fBMessage::Code\fP code)\fC [static]\fP"
.PP
Creates a message based on the code passed. \fBParameters:\fP
.RS 4
\fIcode\fP The message type to create.
.RE
.PP
\fBReturns:\fP
.RS 4
Pointer to newly created message, NULL if it hasn't been added to the factory. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
